﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using Magicodes.ExporterAndImporter.Core;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

/// <summary>
/// 检验任务基础输入参数
/// </summary>
public class inspectiontaskBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 单号
    /// </summary>
    public virtual string? number { get; set; }
    
    /// <summary>
    /// 质检分类
    /// </summary>
    [Dict("Qualityinspection", AllowNullValue=true)]
    [Required(ErrorMessage = "质检分类不能为空")]
    public virtual string tasktype { get; set; }
    
    /// <summary>
    /// 检验方案
    /// </summary>
    [Required(ErrorMessage = "检验方案不能为空")]
    public virtual long? inspectionschemeid { get; set; }
    
    /// <summary>
    /// 工单
    /// </summary>
    [Required(ErrorMessage = "工单不能为空")]
    public virtual long? ticketsid { get; set; }
    
    /// <summary>
    /// 权限角色
    /// </summary>
    [Dict("Roledis", AllowNullValue=true)]
    [Required(ErrorMessage = "权限角色不能为空")]
    public virtual string roleid { get; set; }
    
}

/// <summary>
/// 检验任务分页查询输入参数
/// </summary>
public class PageinspectiontaskInput : BasePageInput
{
    /// <summary>
    /// 单号
    /// </summary>
    public string? number { get; set; }
    
    /// <summary>
    /// 质检分类
    /// </summary>
    [Dict("Qualityinspection", AllowNullValue=true)]
    public string tasktype { get; set; }
    
    /// <summary>
    /// 检验方案
    /// </summary>
    public long? inspectionschemeid { get; set; }
    
    /// <summary>
    /// 工单
    /// </summary>
    public long? ticketsid { get; set; }
    
    /// <summary>
    /// 权限角色
    /// </summary>
    [Dict("Roledis", AllowNullValue=true)]
    public string roleid { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
     public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 检验任务增加输入参数
/// </summary>
public class AddinspectiontaskInput
{
    /// <summary>
    /// 单号
    /// </summary>
    [MaxLength(100, ErrorMessage = "单号字符长度不能超过100")]
    public string? number { get; set; }
    
    /// <summary>
    /// 质检分类
    /// </summary>
    [Dict("Qualityinspection", AllowNullValue=true)]
    [Required(ErrorMessage = "质检分类不能为空")]
    [MaxLength(100, ErrorMessage = "质检分类字符长度不能超过100")]
    public string tasktype { get; set; }
    
    /// <summary>
    /// 检验方案
    /// </summary>
    [Required(ErrorMessage = "检验方案不能为空")]
    public long? inspectionschemeid { get; set; }
    
    /// <summary>
    /// 工单
    /// </summary>
    [Required(ErrorMessage = "工单不能为空")]
    public long? ticketsid { get; set; }
    
    /// <summary>
    /// 权限角色
    /// </summary>
    [Dict("Roledis", AllowNullValue=true)]
    [Required(ErrorMessage = "权限角色不能为空")]
    [MaxLength(100, ErrorMessage = "权限角色字符长度不能超过100")]
    public string roleid { get; set; }
    
}

/// <summary>
/// 检验任务删除输入参数
/// </summary>
public class DeleteinspectiontaskInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 检验任务更新输入参数
/// </summary>
public class UpdateinspectiontaskInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 单号
    /// </summary>    
    [MaxLength(100, ErrorMessage = "单号字符长度不能超过100")]
    public string? number { get; set; }
    
    /// <summary>
    /// 质检分类
    /// </summary>    
    [Dict("Qualityinspection", AllowNullValue=true)]
    [Required(ErrorMessage = "质检分类不能为空")]
    [MaxLength(100, ErrorMessage = "质检分类字符长度不能超过100")]
    public string tasktype { get; set; }
    
    /// <summary>
    /// 检验方案
    /// </summary>    
    [Required(ErrorMessage = "检验方案不能为空")]
    public long? inspectionschemeid { get; set; }
    
    /// <summary>
    /// 工单
    /// </summary>    
    [Required(ErrorMessage = "工单不能为空")]
    public long? ticketsid { get; set; }
    
    /// <summary>
    /// 权限角色
    /// </summary>    
    [Dict("Roledis", AllowNullValue=true)]
    [Required(ErrorMessage = "权限角色不能为空")]
    [MaxLength(100, ErrorMessage = "权限角色字符长度不能超过100")]
    public string roleid { get; set; }
    
}

/// <summary>
/// 检验任务主键查询输入参数
/// </summary>
public class QueryByIdinspectiontaskInput : DeleteinspectiontaskInput
{
}

/// <summary>
/// 下拉数据输入参数
/// </summary>
public class DropdownDatainspectiontaskInput
{
    /// <summary>
    /// 是否用于分页查询
    /// </summary>
    public bool FromPage { get; set; }
}

/// <summary>
/// 检验任务数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImportinspectiontaskInput : BaseImportInput
{
    /// <summary>
    /// 单号
    /// </summary>
    [ImporterHeader(Name = "单号")]
    [ExporterHeader("单号", Format = "", Width = 25, IsBold = true)]
    public string? number { get; set; }
    
    /// <summary>
    /// 质检分类 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public string tasktype { get; set; }
    
    /// <summary>
    /// 质检分类 文本
    /// </summary>
    [Dict("Qualityinspection")]
    [ImporterHeader(Name = "*质检分类")]
    [ExporterHeader("*质检分类", Format = "", Width = 25, IsBold = true)]
    public string tasktypeDictLabel { get; set; }
    
    /// <summary>
    /// 检验方案 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? inspectionschemeid { get; set; }
    
    /// <summary>
    /// 检验方案 文本
    /// </summary>
    [ImporterHeader(Name = "*检验方案")]
    [ExporterHeader("*检验方案", Format = "", Width = 25, IsBold = true)]
    public string inspectionschemeFkDisplayName { get; set; }
    
    /// <summary>
    /// 工单 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? ticketsid { get; set; }
    
    /// <summary>
    /// 工单 文本
    /// </summary>
    [ImporterHeader(Name = "*工单")]
    [ExporterHeader("*工单", Format = "", Width = 25, IsBold = true)]
    public string ticketsFkDisplayName { get; set; }
    
    /// <summary>
    /// 权限角色 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public string roleid { get; set; }
    
    /// <summary>
    /// 权限角色 文本
    /// </summary>
    [Dict("Roledis")]
    [ImporterHeader(Name = "*权限角色")]
    [ExporterHeader("*权限角色", Format = "", Width = 25, IsBold = true)]
    public string roleDictLabel { get; set; }
    
}
